import path from 'path';

export default {
  PORT: 3000,
  DB_URL: 'mongodb://test:123456@localhost:27017/test',
  REDIS: {
    host: '127.0.0.1',
    port: 6379,
    password: '123456'
  },
  MAIL: {
    user: '1498725065@qq.com',
    pass: 'bkuboevwuuughcdg'
  },
  JWT: {
    secret: 'qq1498725065aaas',
    loginExpried: 60 * 60, // 登录token过期时间，毫秒为单位
    mailExpried: 30 * 60 // 邮件验证token过期时间
  },
  BASIC_URL: process.env.NODE_ENV === 'production' ? 'http://www.xxx.com' : 'http://localhost:8080',
  uploadPath: process.env.NODE_ENV === 'production' ? 'app/public' : path.join(path.resolve(__dirname), '../../public')
};
